<template>
    <require from="./em-project-edit.less"></require>
    <em-modal classes="em-project-edit" em-modal.ref="emModal" onshow.call="showHandler($event)" onapprove.call="approveHandler($event)" confirm-label="关闭">
        <div slot="header">编辑项目</div>
        <div slot="content" style="min-height: 410px;">
            <div ref="tabRef" class="ui pointing secondary menu">
                <a class="item active" data-tab="project-basic">基本信息</a>
                <a class="item" data-tab="project-member">成员</a>
                <a class="item" data-tab="project-status">状态</a>
                <a class="item" data-tab="project-version">版本</a>
                <a class="item" data-tab="project-module">模块</a>
                <a class="item" data-tab="project-epic">史诗</a>
            </div>
            <div class="ui tab basic segment active" data-tab="project-basic">
                <div ref="frmRef" class="ui form">
                    <div class="inline field required">
                        <label>名称</label>
                        <input type="text" placeholder="" value.bind="project.name">
                    </div>
                    <div class="inline field required disabled">
                        <label>标识</label>
                        <input type="text" placeholder="2-10位A-Z字符组合" value.bind="project.key">
                    </div>
                    <div class="inline field">
                        <label style="padding-right: 7px;">网址</label>
                        <input type="text" placeholder="" value.bind="project.website">
                    </div>
                    <div class="inline field required">
                        <label>项目负责人</label>
                        <em-dropdown classes="search selection" label="name" value="username" items.bind="users" selected.bind="project.leader"></em-dropdown>
                    </div>
                    <div class="inline field required">
                        <label>默认经办人</label>
                        <em-dropdown classes="search selection" label="name" value="username" items.bind="users" selected.bind="project.operator"></em-dropdown>
                    </div>
                    <div class="inline field" style="margin-top: 32px;">
                        <label style="visibility: hidden;"></label>
                        <div click.delegate="saveHandler()" class="ui blue button">保存</div>
                    </div>
                </div>
            </div>
            <div class="ui tab basic segment" data-tab="project-member">
                <em-project-edit-member project.bind="project"></em-project-edit-member>
            </div>
            <div class="ui tab basic segment" data-tab="project-status">
                <em-project-edit-status project.bind="project"></em-project-edit-status>
            </div>
            <div class="ui tab basic segment" data-tab="project-version">
                <em-project-edit-version project.bind="project"></em-project-edit-version>
            </div>
            <div class="ui tab basic segment" data-tab="project-module">
                <em-project-edit-module project.bind="project"></em-project-edit-module>
            </div>
            <div class="ui tab basic segment" data-tab="project-epic">
                <em-project-edit-epic project.bind="project"></em-project-edit-epic>
            </div>
        </div>
    </em-modal>
</template>
